package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * MemberVip entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_MEMBER_VIP", schema = "HCD_DEV")
public class MemberVip extends Entity implements java.io.Serializable {

	// Fields

	private MemberVipId id;
	private Member member;
	private Company company;
	private Store store;
	private Float balance;
	private String checkCode;
	private Integer status;
	private Float prepaidMax;
	private Float prepaidTotal;
	private Long updateTime;
	private Long addTime;

	// Constructors

	/** default constructor */
	public MemberVip() {
	}

	/** minimal constructor */
	public MemberVip(MemberVipId id, Member member, Company company, Float balance,
			String checkCode, Integer status, Float prepaidMax, Float prepaidTotal,
			Long updateTime, Long addTime) {
		this.id = id;
		this.member = member;
		this.company = company;
		this.balance = balance;
		this.checkCode = checkCode;
		this.status = status;
		this.prepaidMax = prepaidMax;
		this.prepaidTotal = prepaidTotal;
		this.updateTime = updateTime;
		this.addTime = addTime;
	}

	/** full constructor */
	public MemberVip(MemberVipId id, Member member, Company company, Store store, Float balance,
			String checkCode, Integer status, Float prepaidMax, Float prepaidTotal,
			Long updateTime, Long addTime) {
		this.id = id;
		this.member = member;
		this.company = company;
		this.store = store;
		this.balance = balance;
		this.checkCode = checkCode;
		this.status = status;
		this.prepaidMax = prepaidMax;
		this.prepaidTotal = prepaidTotal;
		this.updateTime = updateTime;
		this.addTime = addTime;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "companyId", column = @Column(name = "COMPANY_ID", nullable = false, precision = 15, scale = 0)),
			@AttributeOverride(name = "memberId", column = @Column(name = "MEMBER_ID", nullable = false, precision = 15, scale = 0)) })
	public MemberVipId getId() {
		return this.id;
	}

	public void setId(MemberVipId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MEMBER_ID", nullable = false, insertable = false, updatable = false)
	public Member getMember() {
		return this.member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "COMPANY_ID", nullable = false, insertable = false, updatable = false)
	public Company getCompany() {
		return this.company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STORE_ID")
	public Store getStore() {
		return this.store;
	}

	public void setStore(Store store) {
		this.store = store;
	}

	@Column(name = "BALANCE", nullable = false, precision = 8)
	public Float getBalance() {
		return this.balance;
	}

	public void setBalance(Float balance) {
		this.balance = balance;
	}

	@Column(name = "CHECK_CODE", nullable = false, length = 100)
	public String getCheckCode() {
		return this.checkCode;
	}

	public void setCheckCode(String checkCode) {
		this.checkCode = checkCode;
	}

	@Column(name = "STATUS", nullable = false, precision = 2, scale = 0)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "PREPAID_MAX", nullable = false, precision = 8)
	public Float getPrepaidMax() {
		return this.prepaidMax;
	}

	public void setPrepaidMax(Float prepaidMax) {
		this.prepaidMax = prepaidMax;
	}

	@Column(name = "PREPAID_TOTAL", nullable = false, precision = 8)
	public Float getPrepaidTotal() {
		return this.prepaidTotal;
	}

	public void setPrepaidTotal(Float prepaidTotal) {
		this.prepaidTotal = prepaidTotal;
	}

	@Column(name = "UPDATE_TIME", nullable = false, precision = 15, scale = 0)
	public Long getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Long updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "ADD_TIME", nullable = false, precision = 15, scale = 0)
	public Long getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Long addTime) {
		this.addTime = addTime;
	}

}